Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue fix - modals/UrlModal: reset clicked state on close #1770

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

hom3mad3
Copy link
Contributor

@@ -27,6 +27,10 @@ export const UrlModal = (props) => {
}
}

const handleModalClose = () => {
setClicked(false) // Reset the clicked state when modal closes
Copy link
Collaborator

@sevfurneaux sevfurneaux Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we don't need a comment here if setClicked was renamed to make it more explicit what it is doing? Maybe setClosed. Although this is a slightly different type of modal, right? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sevfurneaux yes, the clicked state refers to the copy URL button. I could change it to setCopied—do you reckon that makes it clearer?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, setCopied makes sense!

@hom3mad3 hom3mad3 force-pushed the mr-2025-02-fix-copy-on-close branch from 1ebe18f to cc12393 Compare February 12, 2025 14:10
@hom3mad3 hom3mad3 merged commit 48f1d94 into main Feb 12, 2025
2 checks passed
@hom3mad3 hom3mad3 deleted the mr-2025-02-fix-copy-on-close branch February 12, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants